package com.ruoyi.customer.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.system.domain.TFileInfo;
import java.util.Date;
import java.util.List;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import org.apache.commons.compress.utils.Lists;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 客户信息业务对象 t_customer
 *
 * @author suntf
 * @date 2023-07-29
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class CustomerBo extends BaseEntity {

    /**
     * $column.columnComment新申请
     */
    private Long id;

    /**
     * 姓名
     */
    @NotBlank(message = "姓名不能为空", groups = { EditGroup.class })
    private String name;

    /**
     * 客户电话
     */
    //@Pattern(regexp="^1[3,4,5,6,7,8,9]\\d{9}$", groups = {AddGroup.class})
    @NotBlank(message = "客户电话不能为空", groups = { AddGroup.class, EditGroup.class })
    private String tel;

    /**
     * 星级 字典 level.type
     */
    private String level;

    /**
     * 贷款类型 loan.type
     */
    private String loanType;

    /**
     * 年龄
     */
    private String age;

    /**
     * 性别 sex.type
     */
    private String sex;

    /**
     * 标签
     */
    private String label;

    /**
     * 学历
     */
    private String education;

    /**
     * 是否有房 house.type
     */
    private String house;

    /**
     * 是否有车 car.type
     */
    private String car;

    /**
     * 保单 warranty.type
     */
    private String warranty;

    /**
     * 社保 insurance.type
     */
    private String insurance;

    /**
     * 公积金 fund.type
     */
    private String fund;

    /**
     * 工资
     */
    private String salary;

    /**
     * 申请额度
     */
    private String applyMoney;

    /**
     * 省份
     */
    private String province;

    /**
     * 城市
     */
    private String city;

    /**
     * 区县
     */
    private String county;

    /**
     * 备注
     */
    private String remark;

    /**
     * 客户经理
     */
    private String manager;

    /**
     * 客户的状态，对于客户经理的来说 customer.status
     */
    private String customerStatus;

    /**
     * 客户对应公司内部流转状态 company.status
     */
    //@NotBlank(message = "客户对应公司内部流转状态 company.status不能为空", groups = { AddGroup.class, EditGroup.class })
    private String companyStatus;

    /**
     * 组织，根据导入人组织，每次分配都变化
     */
    //@NotBlank(message = "组织，根据导入人组织，每次分配都变化不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long distributeDeptId;

    /**
     * 在分配 默认0 1再分配
     */
    //@NotBlank(message = "在分配 默认0 1再分配不能为空", groups = { AddGroup.class, EditGroup.class })
    private String share;

    /**
     * 0 系统， 1再分配
     */
    //@NotBlank(message = "0 系统， 1再分配不能为空", groups = { AddGroup.class, EditGroup.class })
    private String source;

    /**
     * 0 新申请 1 在分配
     */
    //@NotBlank(message = "0 新申请 1 在分配不能为空", groups = { AddGroup.class, EditGroup.class })
    private String dataSource;

    /**
     * 是否是重要客户 0 是  1 是
     */
    //@NotBlank(message = "是否是重要客户 0 是  1 是不能为空", groups = { AddGroup.class, EditGroup.class })
    private String vip;

    /**
     * 任务id，默认为-1，没有任务，只有等分配到人才有任务
     */
    //@NotNull(message = "任务id，默认为-1，没有任务，只有等分配到人才有任务不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long taskId;

    /**
     * $column.columnComment
     */
    private String bz;

    private String backReason;

    private List<TFileInfo> htList = Lists.newArrayList();

    /**
     * 未更新天数
     */
    private String notUpdateDay;

    /**
     * 实际申请时间
     */
    private Date realityApplyTime;

    /**  时间相关 **/
    private String timeType;
    private String applyTimeScope;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    private String currentType;
    private String starType;

    private Long deptId;

    private String revieweFlag;

    private Long busUserId;

    private String sortInfo;

    private String sortRule;

    private int isNew;

    // 渠道ID
    private String channelId;

}
